<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>vue组件9</title>
    <script src="../../js/vue3.js"></script>
    <style>
        #app {
            margin: 2rem auto;
            width: 30%;
        }
        
        p {
            font-size: 1.5rem;
            font-weight: bold;
        }
    </style>
</head>

<body>
    <!-- 运行 -->
    <div id="app">
        <fa></fa>
    </div>
    <!-- 模版 -->
    <template id="fas">
        <son>未定义msg</son>
        <son>未定义app</son>
    </template>
    <template id="sons">
        <p>Error</p>
        <slot></slot>
    </template>
    <script>
        const v_app = Vue.createApp({
            data() {
                return {}
            },
            components: {
                fa: {
                    template: "#fas",
                    data() {
                        return {

                        }

                    },
                    components: {
                        son: {
                            template: "#sons",
                            data() {
                                return {

                                }

                            },
                        }
                    }
                }
            }
        });

        v_app.mount("#app");
    </script>
</body>

</html>